﻿Imports System
Imports System.Data
Imports System.Configuration
Imports System.Collections
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Web.UI.HtmlControls

Partial Class Index
	Inherits WebPageBase

	Protected Sub Button2_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button2.Click

		Select Case Me.uxModeDropDownList.SelectedValue
			Case "BrowseDisplayMode"
				uxIndexWebPartManager.DisplayMode = WebPartManager.BrowseDisplayMode
			Case "DesignDisplayMode"
				uxIndexWebPartManager.DisplayMode = WebPartManager.DesignDisplayMode
			Case "EditDisplayMode"
				uxIndexWebPartManager.DisplayMode = WebPartManager.EditDisplayMode
			Case "CatalogDisplayMode"
				uxIndexWebPartManager.DisplayMode = WebPartManager.CatalogDisplayMode
		End Select

	End Sub

	Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load

		If HttpContext.Current.User.Identity.IsAuthenticated Then
			Me.uxPortalPanel.Visible = True
			Me.uxPortalPanel.Enabled = True
			Label1.Text = "Scope is: " + uxIndexWebPartManager.Personalization.Scope.ToString()
		End If

	End Sub
End Class
